home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_078 / mandelvroom / nav.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  2KB  |  65 lines

  1. /***************************************************************************
  2.  *
  3.  *                   MandelVroom Navigation Control
  4.  *
  5.  *                         Kevin L. Clague
  6.  *
  7.  *                        Copyright (C) 1987
  8.  *
  9.  **************************************************************************/
  10.  
  11. #include "mand.h"
  12.  
  13. extern struct RastPort *rp;
  14.  
  15. extern USHORT CmdMode;
  16.  
  17. LONG NavTop, NavBot, NavLeft, NavRight;
  18.  
  19. extern SHORT XScale, YScale;
  20.  
  21. SHORT BoxSizeX = 3, BoxSizeY = 3, DragSize = 3;
  22.  
  23. DrawBox( Left, Top, Right, Bottom)
  24.   SHORT Top, Left, Bottom, Right;
  25. {
  26.   SetDrMd(rp, COMPLEMENT);
  27.   /*
  28.    * Draw the new box
  29.    */
  30.   Move(rp, Left,  Top   );
  31.   Draw(rp, Right, Top   );
  32.   Draw(rp, Right, Bottom);
  33.   Draw(rp, Left,  Bottom);
  34.   Draw(rp, Left,  Top+1 );
  35.  
  36.   SetDrMd(rp, JAM1);
  37. } /* DrawBox */
  38.  
  39. DrawExtras( Left, Top, Right, Bottom)
  40.   SHORT Top, Left, Bottom, Right;
  41. {
  42.   SetDrMd(rp, COMPLEMENT);
  43.   /*
  44.    * Draw Resize gadget
  45.    */
  46.   Move(rp, Right - 1,                    Bottom - (BoxSizeY << YScale));
  47.   Draw(rp, Right - (BoxSizeX << XScale), Bottom - (BoxSizeY << YScale));
  48.  
  49.   Move(rp, Right - (BoxSizeX << XScale), Bottom + 1 - (BoxSizeY << YScale));
  50.   Draw(rp, Right - (BoxSizeX << XScale), Bottom - 1);
  51.  
  52.   Move(rp, Left  + 1,                    Top + (DragSize << YScale));
  53.   Draw(rp, Right - 1,                    Top + (DragSize << YScale));
  54.  
  55.   /*
  56.    * Drag bar bar / close gadget separator
  57.    */
  58.   Move(rp, Left + (4 << XScale), Top + 1);
  59.   Draw(rp, Left + (4 << XScale), Top + (DragSize << YScale) -1 );
  60.  
  61.   SetDrMd(rp, JAM1);
  62. } /* DrawBox */
  63.  
  64.  
  65.